home *** CD-ROM | disk | FTP | other *** search
/ TOS Silver 2000 / TOS Silver 2000.iso / programm / GNU_C++ / LIB / SRC / GEMLIB38.LZH / x_form.c < prev    next >
Encoding:
C/C++ Source or Header  |  1998-07-11  |  2.7 KB  |  111 lines

  1. /*
  2.  * Aes form library extension of MagiC
  3.  *
  4.  */
  5. #include "gemx.h"
  6.  
  7.  
  8. int form_popup(OBJECT *tree, int x, int y)
  9. {
  10.     aes_intin[0] = x;
  11.     aes_intin[1] = y;
  12.     aes_addrin[0] = (long)tree;
  13.    aes_control[0] = 135;
  14.    aes_control[1] = 2;
  15.    aes_control[2] = 1;
  16.    aes_control[3] = 1;
  17.    aes_control[4] = 0;
  18.    aes(&aes_params);
  19.     return aes_intout[0];
  20. }
  21.  
  22. int form_wbutton(OBJECT *fo_btree, int fo_bobject, int fo_bclicks, int *fo_bnxtobj, int whandle)
  23. {
  24.     aes_intin[0] = fo_bobject;
  25.     aes_intin[1] = fo_bclicks;
  26.     aes_intin[2] = whandle;
  27.     aes_addrin[0] = (long)fo_btree;
  28.    aes_control[0] = 63;
  29.    aes_control[1] = 3;
  30.    aes_control[2] = 2;
  31.    aes_control[3] = 1;
  32.    aes_control[4] = 0;
  33.    aes(&aes_params);
  34.     *fo_bnxtobj = aes_intout[1];
  35.     return aes_intout[0];
  36. }
  37.  
  38. int form_wkeybd(OBJECT *fo_ktree, int fo_kobject, int fo_kobnext, int fo_kchar, 
  39.                     int *fo_knxtobject, int *fo_knxtchar, int whandle)
  40. {
  41.     aes_intin[0] = fo_kobject;
  42.     aes_intin[1] = fo_kchar;
  43.     aes_intin[2] = fo_kobnext;
  44.     aes_intin[3] = whandle;
  45.     aes_addrin[0] =(long)fo_ktree;
  46.    aes_control[0] = 64;
  47.    aes_control[1] = 4;
  48.    aes_control[2] = 3;
  49.    aes_control[3] = 1;
  50.    aes_control[4] = 0;
  51.    aes(&aes_params);
  52.     *fo_knxtobject = aes_intout[1];
  53.     *fo_knxtchar = aes_intout[2];
  54.     return aes_intout[0];
  55. }
  56.  
  57. int form_xdial(int fo_diflag, int fo_dilittlx, int fo_dilittly, int fo_dilittlw, 
  58.                     int fo_dilittlh, int fo_dibigx, int fo_dibigy, int fo_dibigw, 
  59.                     int fo_dibigh, void **flydial)
  60. {
  61.     aes_intin[0] = fo_diflag;
  62.     aes_intin[1] = fo_dilittlx;
  63.     aes_intin[2] = fo_dilittly;
  64.     aes_intin[3] = fo_dilittlw;
  65.     aes_intin[4] = fo_dilittlh;
  66.     aes_intin[5] = fo_dibigx;
  67.     aes_intin[6] = fo_dibigy;
  68.     aes_intin[7] = fo_dibigw;
  69.     aes_intin[8] = fo_dibigh;
  70.     aes_addrin[0] = (long)flydial;
  71.    aes_control[0] = 51;
  72.    aes_control[1] = 9;
  73.    aes_control[2] = 1;
  74.    aes_control[3] = 1;
  75.    aes_control[4] = 0;
  76.    aes(&aes_params);
  77.     return aes_intout[0];
  78. }
  79.  
  80. int form_xdo(OBJECT *tree, int startob, int *lastcrsr, XDO_INF *tabs, void *flydial)
  81. {
  82.     aes_intin[0] = startob;
  83.     aes_addrin[0] = (long)tree;
  84.     aes_addrin[1] = (long)tabs;
  85.     aes_addrin[2] = (long)flydial;
  86.    aes_control[0] = 50;
  87.    aes_control[1] = 1;
  88.    aes_control[2] = 2;
  89.    aes_control[3] = 3;
  90.    aes_control[4] = 0;
  91.    aes(&aes_params);
  92.     *lastcrsr = aes_intout[1];
  93.     return aes_intout[0];
  94. }
  95.  
  96. int form_xerr(long errcode, char *errfile)
  97. {
  98.     unsigned short *i = (unsigned short *)&errcode;
  99.  
  100.     aes_intin[0] = i[1];
  101.     aes_intin[1] = i[0];
  102.     aes_addrin[0] = (long)errfile;
  103.    aes_control[0] = 136;
  104.    aes_control[1] = 2;
  105.    aes_control[2] = 1;
  106.    aes_control[3] = 1;
  107.    aes_control[4] = 0;
  108.    aes(&aes_params);
  109.     return aes_intout[0];
  110. }
  111.